using System;
using System.Collections;

namespace NimblePros.SimpleCms
{
    public enum ExceptionType
    {
        ConnectionStringName,
        ConfigMasterPage,
        AdminPage,
        EditPage,
        ConnectionString,
        MasterPage,
        Other,
        Base
    }

    internal sealed class CmsErrorMessage
    {
        private Hashtable errorList = new Hashtable();

        public CmsErrorMessage()
        {
            errorList.Add(ExceptionType.ConnectionStringName, "ConnectionStringName is not specified in CmsConfig.");
            errorList.Add(ExceptionType.ConfigMasterPage, "MasterPage is not specified in CmsConfig.");
            errorList.Add(ExceptionType.AdminPage, "AdminPage is not specified in CmsConfig.");
            errorList.Add(ExceptionType.EditPage, "EditPage is not specified in CmsConfig.");
            errorList.Add(ExceptionType.ConnectionString, "The ConnectionString was not found in Web.Config");
            errorList.Add(ExceptionType.MasterPage, "The Specified MasterPage cannot be found.");
            errorList.Add(ExceptionType.Other, "An unknown error has occurred in Simple CMS.");
        }

        public string this[ExceptionType key]
        {
            get
            {
                return errorList[key].ToString();
            }
        }
    }
}
